package com.aldd.controller;

import com.aldd.entity.Food;
import com.aldd.service.FoodService;
import lombok.Data;

@Data
public class FoodController {
    private FoodService foodService;

    public Food getFoodById(int id) {
        Food food = foodService.getFoodById(id);
        return food;
    }

    public String addFood(Food food) {
        Boolean flag = foodService.addFood(food);
        return flag ? "添加成功" : "添加失败";
    }
}
